SUBDIRS = lib test

Makefile.PL : Makefile.PL.in

Makefile.perl : Makefile.PL
	@PERL@ Makefile.PL MAKEFILE=Makefile.perl

all-local: Makefile.perl
	test "@abs_srcdir@" = "@abs_builddir@" || \
		$(INSTALL) @abs_srcdir@/MANIFEST @abs_builddir@
	${MAKE} -f Makefile.perl
	find blib -name Makefile -exec rm -f {} \;

check-local:
	@PERL@ -Iblib/lib -I@abs_srcdir@ \
		@abs_srcdir@/test.pl @abs_srcdir@/test/*.t

install-exec-local: Makefile.perl
	test "@abs_srcdir@" = "@abs_builddir@" || \
		$(INSTALL) @abs_srcdir@/MANIFEST @abs_builddir@
	${MAKE} -f Makefile.perl install DESTDIR=$(DESTDIR)/

uninstall-local:
	for f in `${MAKE} -f Makefile.perl uninstall | ${AWK} '/^unlink/{print $$2}'`; do \
		rm -f $$f; \
	done

clean-local: Makefile.perl
	${MAKE} -f Makefile.perl clean
	rm -rf Makefile.perl.old
	test "@abs_srcdir@" = "@abs_builddir@" || \
		rm -f MANIFEST

EXTRA_DIST = MANIFEST Makefile.PL.in test.pl
